package org.tote.dao;

import org.springframework.stereotype.Component;
import org.tote.exception.NoSuchDaoAvailableException;
import org.tote.model.MailMessageTemplate;
import org.tote.model.MailMessageType;
import org.tote.model.User;
import org.tote.model.UserLight;

/**
 * Provides an access to various DAO implementations.
 * 
 */
@Component
public interface DaoFacade {

	public <T> void save(T entity) throws NoSuchDaoAvailableException;

	public <T> void update(T entity) throws NoSuchDaoAvailableException;

	public <T> void remove(T entity) throws NoSuchDaoAvailableException;

	public <T, I> T getById(I id, Class<T> clazz);

	public MailMessageTemplate getMailMessageTemplateById(MailMessageType mailMessageType);

	public User getUserById(Long userId);

	public UserLight getUserLightById(Long userId);

	public UserDao getUserDao();

	public UserLightDao getUserLightDao();

	public RoleDao getRoleDao();

	public MailMessageDao getMailMessageDao();

}
